package com.varian.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.varian.security.model.SecurityEntity;
import com.varian.system.enums.NoticeReceiveTypeEnum;
import com.varian.system.enums.NoticeStatusEnum;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author ben
 * @since 2024/8/13
 */
@Data
@TableName(value = "varian_notice", autoResultMap = true)
public class SysNotice extends SecurityEntity {

    /**
     * 通知接收类型 0 全部用户 1 指定用户
     */
    private NoticeReceiveTypeEnum noticeReceiveType;
    /**
     * 通知标题
     */
    private String noticeTitle;
    /**
     * 通知描述
     */
    private String noticeDesc;
    /**
     * 通知内容
     */
    private String noticeContent;
    /**
     * 通知发布时间
     */
    private LocalDateTime noticePublishTime;
    /**
     * 通知过期时间
     */
    private LocalDateTime noticeExpireTime;
    /**
     * 通知接收人ID
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<Long> noticeReceiverIds;
    /**
     * 通知类型
     */
    private String noticeType;
    /**
     * 通知图标
     */
    private String noticeIcon;
    /**
     * 通知状态 0 失效 1 未启用 2 启用
     */
    private NoticeStatusEnum noticeStatus;
}
